#!/usr/bin/bash

# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2020 Joyent, Inc.
#

set -o xtrace

. /lib/svc/share/smf_include.sh
. /lib/sdc/config.sh

# We are running early enough in the boot process, that
# the /dev entries for any ccid entries (including /dev/ccid
# itself) don't show up.  Running devfsadm first seems
# to solve this, though perhaps there's a better
# method? Depending on milestone/devices doesn't seem to be sufficient.
devfsadm

/usr/lib/kbm/kbmd || exit $SMF_ERR_FATAL

exit $SMF_EXIT_OK
